package com.cnzhy.servlet;

import com.cnzhy.http.Request;
import com.cnzhy.http.Response;

import java.io.OutputStream;

public class LoginServlet extends Servlet {
    @Override
    public void doGet(Request request, Response response) {
        this.doPost(request, response);
    }

    @Override
    public void doPost(Request request, Response response) {
        try(OutputStream outputStream = response.outputStream) {
            String res = Response.responseHeader + "Hello,welcome to here !";
            outputStream.write(res.getBytes());
            outputStream.flush();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
